<?php

namespace app\common\helper;

class FormatHelper {

    const SUCCESS = 0;
    const ERROR = 1;

    /**
     * 格式化返回
     *
     * @param $msg
     * @param $data
     * @param int $code
     * @return array
     */
    public static function fReturn($msg,$data,$code = self::SUCCESS){
        return ['msg'=>$msg,'data'=>$data,'code'=>$code];
    }

}